package work20241125;

/**
 * @author zdl
 * @date 2024/11/25
 */
public class Demo1 {
    public static void main(String[] args) {
        run();
        sum(9,1);
        int max = max(2, 4);
        System.out.println(max);
        int hello = hello();
        System.out.println(hello);

    }
    //无参无返回值
    public  static  void run(){
        System.out.println("hello world!");
    }

    //有参无返回值
    public  static void  sum(int a, int b){
        System.out.println(a+b);
    }

    //有参有返回值
    public  static int max(int a,int b){
        if (a > b){
            return a;
        }else {
            return  b;
        }
    }

    //无参有返回值
    public  static int hello(){
        return 1;
    }
}
